/* 
* @Author: Administrator
* @Date:   2016-02-17 09:33:50
* @Last Modified by:   Administrator
* @Last Modified time: 2016-02-17 10:35:20
*/

 // 瀑布流动态jq加载li········································ 


					$(function() {
						// 正常内容的瀑布流
						var iList=5;
						
						for (var i = iList; i < 100; i++) {
							
							$('.quanzhandongtai>li').eq(i).css('display', 'none');
							
						};
						$(window).scroll(function(event) {
							if ($(document).scrollTop() + $(window).height() > $(document).height() - 150) {

									for (var i = iList; i < iList+3; i++) {
										
										
											$('.quanzhandongtai>li').eq(i).fadeIn(1000);
										


									};

									iList=iList+3;
							};
						});
						// 正常内容的瀑布流结束·········································
						// 点击城市切换之后的瀑布流,i用p代替
					var iList1=5;
						
						for (var p = iList1; p < 100; p++) {
							
							$('.quanzhandongtai2>li').eq(p).css('display', 'none');
							
						};
						$(window).scroll(function(event) {
							if ($(document).scrollTop() + $(window).height() > $(document).height() - 150) {

									for (var p= iList1; p< iList1+3; p++) {
										
										
											$('.quanzhandongtai2>li').eq(p).fadeIn(1000);
									
										console.log(p);

									};

									iList1=iList1+3;
							};
						});
						// 点击城市切换之后的瀑布流结束
						

						// 点击日历之后的瀑布流,i用r代替
					var iList2=5;
						
						for (var r = iList2; r < 100; r++) {
							
							$('.quanzhandongtai3>li').eq(r).css('display', 'none');
							
						};
						$(window).scroll(function(event) {
							if ($(document).scrollTop() + $(window).height() > $(document).height() - 150) {

									for (var r= iList2; r< iList2+3; r++) {
										
										
											$('.quanzhandongtai2>li').eq(r).fadeIn(1000);
									
										console.log(r);

									};

									iList2=iList2+3;
							};
						});
						// 点击日历切换之后的瀑布流结束
						

						// 点击城市切换内容············································
						$('.leftWrap>ul>li').eq(1).click(function(event) {
							$('.quanzhandongtai').stop(true).show('fast');
							$('.quanzhandongtai2').stop(true).hide();
							$('.quanzhandongtai3').stop(true).hide();
							// 每次点击切换都要重置ilist，因为scroll事件一直都会被触发，ilist就会被改变
							iList=5;
							for (var p = iList1; p < 100; p++) {
							
							$('.quanzhandongtai>li').eq(p).css('display', 'none');
							
						};

						});

						$('.tijiao').click(function(event) {
							$('.quanzhandongtai2').stop(true).show('fast');
							$('.quanzhandongtai').stop(true).hide();
							$('.quanzhandongtai3').stop(true).hide();
							iList1=5;
							for (var p = iList1; p < 100; p++) {
							
							$('.quanzhandongtai2>li').eq(p).css('display', 'none');
							
						};
						});




						$('.laydte-tijiao').click(function(event) {
							$('.quanzhandongtai3').stop(true).show('fast');
							$('.quanzhandongtai').stop(true).hide();
							$('.quanzhandongtai2').stop(true).hide();
							iList2=5;
							for (var r = iList1; r < 100; r++) {
							
							$('.quanzhandongtai3>li').eq(r).css('display', 'none');
							
						};
						});

						// 获取日历插件的日期
						var iTime;
						$('.laydte-tijiao').click(function(event) {
							iTime=$('.laydate-icon').val();
							console.log(iTime);
						});









					});



 // 瀑布流动态加载li········································ 